Aiming at the low efficiency of test case automatic generation technology, an IMproved Bacterial Foraging Optimization Algorithm (IM-BFOA) was proposed with introduction of Knet map. Firstly, Kent map was used to increase the diversity of the initial population and global search of bacteria. Secondly, the step size of chemotaxis stage in the algorithm was adaptively designed to make it more rational in the process of bacterial chemotaxis. Finally, a fitness function was constructed according to the program under test to accelerate the optimization of test data. The experimental results show that compared with Genetic Algorithm (GA), Particle Swarm Optimization (PSO) algorithm and standard Bacterial Foraging Optimization Algorithm (BFOA), the proposed algorithm is the best in terms of iterations number and running time with the guarantee of coverage and has high efficiency of test case generation.
Aiming at the problem of erroneous judgement resulted from the lack of permission and time sequence considerations in traditional Web test case generation, a method combining the Unified Modeling Language (UML) activity diagram and statechart diagram was proposed,which generated testing cases according to the different users' permissions and interaction process analysis of Web page links. This proposed method generated extended statechart diagram containing information elements, got the final Web link testing cases with consideration of permission and sequence through transforming the extended statechart diagram and reordering the corresponding paths. In the comparison with the traditional Web testing case generation method which lacked the permission and time sequence considerations, this method avoids the erroneous judgement effectively and has obvious advantages in coverage, accuracy and efficiency.The experimental results show that the proposed method can improve the efficiency, reliability and feasibility of the Web test.
Due to low error checking rate of Web application test, a method of test case generation for Web applications based on state transition was proposed. By constructing state transition diagram of pages, event transition table and navigation transition table, the link relationship of Web applications was shown. This approach generated test path from state transition tree of pages got from state transition diagram of pages. Based on equivalence partitioning principles, a coverage criteria was proposed, then a test case set was reported as result combined with information from event transition table and navigation transition table. The result shows that the proposed method can represent link relationship of Web applications effectively, and improve error checking rate of test case.